I am starting to investigate what is going on in small scales in my co-evolution simulation. I decided to get newt and snake information and see in they were correlated in n-n grids. I collected correlated data from the GA experiments from the 5,000, 20,000, and 100,000 simulations. (I also tested the correlations with and without perUnitArea=T. It turns out when you don’t have perUnitArea=T the edge of the simulation has a greater effect on the calculations turning the correlations positive.) I also will examine how the correlation values change when the grid has more boxes (smaller area to compare). I will specifically, test 5 by 5, 8 by 8, 10 by 10 and 20 by 20 grids
My simulation has newts and snakes coevolving in an arms race! The newts are toxic and interact with resistant snakes. Snakes are attacking and eating the newts, and in order to eat more newts they are becoming more resistant. However, if a snake eats a newt that is more toxic the snake dies. As snakes become more resistant, less toxic newts are being devoured, leaving only the most toxic newts. These toxic newts reproduce and create even more toxic newts. The cycle contentiously repeats. My simulation is run in a two-dimensional space with a x and y axis.
GA1 experiment values:
GA2 experiment values:
collected info:
Tested Grids
Something I noticed when playing around with different variables in my simulation was that there was a large effect when I was changing interaction rate. So I will also look at that here. Special note when interaction rate is increased newts and snake may avoid each other.
Before running this experiment, I thought about the possible outcomes. I am looking at relationships between species phenotypes, population size, and resistance and toxicity between different sized regions. I predicted that the number of newts and the amount of toxicity & the number of snakes and the amount of resistance will be very correlated (green line). I also predicted that when newts and snakes are co-evolving then their phenotypes would be positively correlated (blue line). I think that the number of newts will be negativity correlated with the population size of snakes and vice-versa (purple line). For example, if there are more snakes in a specific region (and the amount of snakes are increasing) then there wold be less newts (and the amount of newts would be decreasing). I also predict that the amount of toxin in a region will be negatively correlated with the population size of snakes & that resistance will also be negatively correlated with the population size of newts (red line). For example, if the newts on a specific region become more toxic (increasing the total amount of toxicity) the number of snakes will decrease (as they try to eat a more toxic newt they die). Below is a graphical representation of my predictions.
After, plotting the results number of newts by the amount toxin and the number of snakes by the amount of resistance was very close to 1. It is not plotted in my main results.
First, I process the data that I collected from the cost 1on1 slim simulations. There are 16 different simulations in the GA1 experiment and 25 different simulations in the GA2 experiment (I will refer to these simulations as groups). Here I will output the groups simulation letter along with the mutation rate and effect size of both newts and snakes. I collected data from 8 different simulations groups testing what happens as the length of the simulation increases as and testing how the size of the measured area effects the correlation calculations.
## [1] "Simulation A: Snake mu-rate & effect sd (1.0e-08, 0.005) Newt mu-rate & effect sd (1.0e-08, 0.005)"
## [1] "Simulation B: Snake mu-rate & effect sd (1.0e-08, 0.005) Newt mu-rate & effect sd (1.0e-09, 0.05)"
## [1] "Simulation C: Snake mu-rate & effect sd (1.0e-08, 0.005) Newt mu-rate & effect sd (1.0e-10, 0.5)"
## [1] "Simulation D: Snake mu-rate & effect sd (1.0e-08, 0.005) Newt mu-rate & effect sd (1.0e-11, 5.0)"
## [1] "Simulation E: Snake mu-rate & effect sd (1.0e-09, 0.05) Newt mu-rate & effect sd (1.0e-08, 0.005)"
## [1] "Simulation F: Snake mu-rate & effect sd (1.0e-09, 0.05) Newt mu-rate & effect sd (1.0e-09, 0.05)"
## [1] "Simulation G: Snake mu-rate & effect sd (1.0e-09, 0.05) Newt mu-rate & effect sd (1.0e-10, 0.5)"
## [1] "Simulation H: Snake mu-rate & effect sd (1.0e-09, 0.05) Newt mu-rate & effect sd (1.0e-11, 5.0)"
## [1] "Simulation I: Snake mu-rate & effect sd (1.0e-10, 0.5) Newt mu-rate & effect sd (1.0e-08, 0.005)"
## [1] "Simulation J: Snake mu-rate & effect sd (1.0e-10, 0.5) Newt mu-rate & effect sd (1.0e-09, 0.05)"
## [1] "Simulation K: Snake mu-rate & effect sd (1.0e-10, 0.5) Newt mu-rate & effect sd (1.0e-10, 0.5)"
## [1] "Simulation L: Snake mu-rate & effect sd (1.0e-10, 0.5) Newt mu-rate & effect sd (1.0e-11, 5.0)"
## [1] "Simulation M: Snake mu-rate & effect sd (1.0e-11, 5.0) Newt mu-rate & effect sd (1.0e-08, 0.005)"
## [1] "Simulation N: Snake mu-rate & effect sd (1.0e-11, 5.0) Newt mu-rate & effect sd (1.0e-09, 0.05)"
## [1] "Simulation O: Snake mu-rate & effect sd (1.0e-11, 5.0) Newt mu-rate & effect sd (1.0e-10, 0.5)"
## [1] "Simulation P: Snake mu-rate & effect sd (1.0e-11, 5.0) Newt mu-rate & effect sd (1.0e-11, 5.0)"
Correlation values were collected every 10th generation with the exception of the 1st generation. The first figure presented is the correlation calculations for simulation A up to 5,000 generations with a 5 by 5 grid. The red line represents calculation A which is the correlation between mean newt phenotype and mean snake phenotype (i predict this would be positive). The green line (CB) is the correlation between the number of newts and the number of snakes (I predicted this would be negative). The blue line is (CC) and represents the correlation between the sum of toxicity and the number of snakes. The purple line (CD) is the correlation between the amount of resistance and the number of newt (predicted to be negative).
## [1] "CA = mean_newt_pheno_By_mean_snake_pheno"
## [1] "CB = num_newts_By_num_snakes"
## [1] "CC = sum_newt_pheno_By_num_snake"
## [1] "CD = sum_snake_pheno_By_num_newt"
## [1] "CA = mean_newt_pheno_By_mean_snake_pheno"
## [1] "CB = num_newts_By_num_snakes"
## [1] "CC = sum_newt_pheno_By_num_snake"
## [1] "CD = sum_snake_pheno_By_num_newt"
## [1] "CA = mean_newt_pheno_By_mean_snake_pheno"
## [1] "CB = num_newts_By_num_snakes"
## [1] "CC = sum_newt_pheno_By_num_snake"
## [1] "CD = sum_snake_pheno_By_num_newt"
## [1] "CA = mean_newt_pheno_By_mean_snake_pheno"
## [1] "CB = num_newts_By_num_snakes"
## [1] "CC = sum_newt_pheno_By_num_snake"
## [1] "CD = sum_snake_pheno_By_num_newt"
## [1] "CA = mean_newt_pheno_By_mean_snake_pheno"
## [1] "CB = num_newts_By_num_snakes"
## [1] "CC = sum_newt_pheno_By_num_snake"
## [1] "CD = sum_snake_pheno_By_num_newt"
## [1] "CA = mean_newt_pheno_By_mean_snake_pheno"
## [1] "CB = num_newts_By_num_snakes"
## [1] "CC = sum_newt_pheno_By_num_snake"
## [1] "CD = sum_snake_pheno_By_num_newt"
## [1] "CA = mean_newt_pheno_By_mean_snake_pheno"
## [1] "CB = num_newts_By_num_snakes"
## [1] "CC = sum_newt_pheno_By_num_snake"
## [1] "CD = sum_snake_pheno_By_num_newt"
## [1] "CA = mean_newt_pheno_By_mean_snake_pheno"
## [1] "CB = num_newts_By_num_snakes"
## [1] "CC = sum_newt_pheno_By_num_snake"
## [1] "CD = sum_snake_pheno_By_num_newt"
## [1] "Simulation A: Snake mu-rate & effect sd (1.0e-08, 0.05) Newt mu-rate & effect sd (1.0e-08, 0.05)"
## [1] "Simulation B: Snake mu-rate & effect sd (1.0e-08, 0.05) Newt mu-rate & effect sd (1.0e-09, 0.158114)"
## [1] "Simulation C: Snake mu-rate & effect sd (1.0e-08, 0.05) Newt mu-rate & effect sd (1.0e-10, 0.5)"
## [1] "Simulation D: Snake mu-rate & effect sd (1.0e-08, 0.05) Newt mu-rate & effect sd (1.0e-11, 1.58114)"
## [1] "Simulation E: Snake mu-rate & effect sd (1.0e-08, 0.05) Newt mu-rate & effect sd (1.0e-12, 5.0)"
## [1] "Simulation F: Snake mu-rate & effect sd (1.0e-09, 0.158114) Newt mu-rate & effect sd (1.0e-08, 0.05)"
## [1] "Simulation G: Snake mu-rate & effect sd (1.0e-09, 0.158114) Newt mu-rate & effect sd (1.0e-09, 0.158114)"
## [1] "Simulation H: Snake mu-rate & effect sd (1.0e-09, 0.158114) Newt mu-rate & effect sd (1.0e-10, 0.05)"
## [1] "Simulation I: Snake mu-rate & effect sd (1.0e-09, 0.158114) Newt mu-rate & effect sd (1.0e-11, 1.58114)"
## [1] "Simulation J: Snake mu-rate & effect sd (1.0e-09, 0.158114) Newt mu-rate & effect sd (1.0e-12, 5.0)"
## [1] "Simulation K: Snake mu-rate & effect sd (1.0e-10, 0.5) Newt mu-rate & effect sd (1.0e-08, 0.05)"
## [1] "Simulation L: Snake mu-rate & effect sd (1.0e-10, 0.5) Newt mu-rate & effect sd (1.0e-09, 0.158114)"
## [1] "Simulation M: Snake mu-rate & effect sd (1.0e-10, 0.5) Newt mu-rate & effect sd (1.0e-10, 0.5)"
## [1] "Simulation N: Snake mu-rate & effect sd (1.0e-10, 0.5) Newt mu-rate & effect sd (1.0e-11, 1.58114)"
## [1] "Simulation O: Snake mu-rate & effect sd (1.0e-10, 0.5) Newt mu-rate & effect sd (1.0e-12, 5.0)"
## [1] "Simulation P: Snake mu-rate & effect sd (1.0e-11, 1.58114) Newt mu-rate & effect sd (1.0e-08, 0.05)"
## [1] "Simulation Q: Snake mu-rate & effect sd (1.0e-11, 1.58114) Newt mu-rate & effect sd (1.0e-09, 0.158114)"
## [1] "Simulation R: Snake mu-rate & effect sd (1.0e-11, 1.58114) Newt mu-rate & effect sd (1.0e-10, 0.5)"
## [1] "Simulation S: Snake mu-rate & effect sd (1.0e-11, 1.58114) Newt mu-rate & effect sd (1.0e-11, 1.58114)"
## [1] "Simulation T: Snake mu-rate & effect sd (1.0e-11, 1.58114) Newt mu-rate & effect sd (1.0e-12, 5.0)"
## [1] "Simulation U: Snake mu-rate & effect sd (1.0e-12, 5.0) Newt mu-rate & effect sd (1.0e-08, 0.05)"
## [1] "Simulation V: Snake mu-rate & effect sd (1.0e-12, 5.0) Newt mu-rate & effect sd (1.0e-09, 0.158114)"
## [1] "Simulation W: Snake mu-rate & effect sd (1.0e-12, 5.0) Newt mu-rate & effect sd (1.0e-10, 0.5)"
## [1] "Simulation X: Snake mu-rate & effect sd (1.0e-12, 5.0) Newt mu-rate & effect sd (1.0e-11, 1.58114)"
## [1] "Simulation Y: Snake mu-rate & effect sd (1.0e-12, 5.0) Newt mu-rate & effect sd (1.0e-12, 5.0)"
## [1] "CA = mean_newt_pheno_By_mean_snake_pheno"
## [1] "CB = num_newts_By_num_snakes"
## [1] "CC = sum_newt_pheno_By_num_snake"
## [1] "CD = sum_snake_pheno_By_num_newt"
## [1] "CA = mean_newt_pheno_By_mean_snake_pheno"
## [1] "CB = num_newts_By_num_snakes"
## [1] "CC = sum_newt_pheno_By_num_snake"
## [1] "CD = sum_snake_pheno_By_num_newt"